$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/10/07 20:09:44 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig	Sat Jun 25 03:22:41 2005
+++ gcc/config/sparc/openbsd64.h	Sat Oct  6 12:41:58 2012
@@ -51,15 +51,20 @@ Boston, MA 02110-1301, USA.  */
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
 
-/* Inherited from sp64-elf.  */
-#undef NO_IMPLICIT_EXTERN_C
-
 #undef ASM_SPEC
+#ifdef PIE_DEFAULT
 #define ASM_SPEC "\
+%{v:-V} -s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+#else
+#define ASM_SPEC "\
 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{mlittle-endian:-EL} \
 %(asm_cpu) %(asm_arch) \
 "
+#endif
 
 /* Layout of source language data types.  */
 #undef WCHAR_TYPE
